package com.example.ricebibackend.service.enums;


/**
 * 身份枚举字段
 * @author ricejson
 */
public enum IdentityEnum {
    ADMIN("ADMIN"),
    NORMAL("NORMAL");

    private String value;

    IdentityEnum(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }

    public static boolean forName(String value) {
        for (IdentityEnum number : IdentityEnum.values()) {
            if (number.getValue().equals(value)) {
                return true;
            }
        }
        return false;
    }
}
